import { App } from 'vue'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts'
import CModal from './common/Modal.vue'
import GroupBtn from './common/GroupBtn.vue'
import { GridComponent, TooltipComponent, LegendComponent, DataZoomComponent, TitleComponent, GraphicComponent } from 'echarts/components'
import Chart from './chart/index.vue'
import Breadcrumb from './breadcrumb/index.vue'
import Upload from './upload/index.vue'
import Drawer from './common/Drawer.vue'
import SelectUploadList from './upload/SelectUploadList.vue'
// Manually introduce ECharts modules to reduce packing size
use([CanvasRenderer, BarChart, LineChart, PieChart, RadarChart, GridComponent, TooltipComponent, LegendComponent, TitleComponent, DataZoomComponent, GraphicComponent])
export default {
  install(Vue: App) {
    Vue.component('Chart', Chart)
    Vue.component('Breadcrumb', Breadcrumb)
    Vue.component('Upload', Upload)
    Vue.component('CModal', CModal)
    Vue.component('CDrawer', Drawer)
    Vue.component('GroupBtn', GroupBtn)
    Vue.component('SelectUploadList', SelectUploadList)
  },
}
